package com.alan.libapi.model.business;

/**
 * @className: TcpJsonResponseSuccess
 * @describtion: TcpJsonResponseSuccess
 * @author: AlanWang
 * @email: 850267876@qq.com
 * @time: 2016/4/27 23:17
 */
public class TcpJsonResponseSuccess<T> extends TcpJsonBaseResponse {
    private T result;

    public TcpJsonResponseSuccess() {
    }

    public TcpJsonResponseSuccess(int id, T result) {
        setId(id);
        setJsonrpc(JSON_RPCVERSION_VALUE);
        this.result = result;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }

    @Override
    public String toString() {
        return "TcpJsonResponseSuccess{" +
                "id=" + getId() +
                ", jsonrpc='" + getJsonrpc() + '\'' +
                ", result=" + result +
                '}';
    }
}
